package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * RcCaractTrib generated by hbm2java
 */
@Entity
@Table(name = "RC_CARACT_TRIB", schema = "RUC")
public class RcCaractTrib implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1197773613101391041L;
	private RcCaractTribId id;
	private TbCaractTrib tbCaractTrib;
	private RcRuc rcRuc;
	private Date ficaractTrib;
	private String cusuario;
	private String scaractTrib;
	private Boolean bstatus;
	private Date fhingreso;
	private String nfolio;

	public RcCaractTrib() {
	}

	public RcCaractTrib(RcCaractTribId id, TbCaractTrib tbCaractTrib,
			RcRuc rcRuc, Date ficaractTrib, String cusuario, Boolean bstatus,
			Date fhingreso) {
		this.id = id;
		this.tbCaractTrib = tbCaractTrib;
		this.rcRuc = rcRuc;
		this.ficaractTrib = ficaractTrib;
		this.cusuario = cusuario;
		this.bstatus = bstatus;
		this.fhingreso = fhingreso;
	}

	public RcCaractTrib(RcCaractTribId id, TbCaractTrib tbCaractTrib,
			RcRuc rcRuc, Date ficaractTrib, String cusuario,
			String scaractTrib, Boolean bstatus, Date fhingreso, String nfolio) {
		this.id = id;
		this.tbCaractTrib = tbCaractTrib;
		this.rcRuc = rcRuc;
		this.ficaractTrib = ficaractTrib;
		this.cusuario = cusuario;
		this.scaractTrib = scaractTrib;
		this.bstatus = bstatus;
		this.fhingreso = fhingreso;
		this.nfolio = nfolio;
	}

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "ccaractTrib", column = @Column(name = "C_CARACT_TRIB", nullable = false, length = 3)),
			@AttributeOverride(name = "ncaractTrib", column = @Column(name = "N_CARACT_TRIB", nullable = false, length = 14)) })
	public RcCaractTribId getId() {
		return this.id;
	}

	public void setId(RcCaractTribId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "C_CARACT_TRIB", nullable = false, insertable = false, updatable = false)
	public TbCaractTrib getTbCaractTrib() {
		return this.tbCaractTrib;
	}

	public void setTbCaractTrib(TbCaractTrib tbCaractTrib) {
		this.tbCaractTrib = tbCaractTrib;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "NIT", nullable = false)
	public RcRuc getRcRuc() {
		return this.rcRuc;
	}

	public void setRcRuc(RcRuc rcRuc) {
		this.rcRuc = rcRuc;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FI_CARACT_TRIB", nullable = false, length = 7)
	public Date getFicaractTrib() {
		return this.ficaractTrib;
	}

	public void setFicaractTrib(Date ficaractTrib) {
		this.ficaractTrib = ficaractTrib;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Column(name = "S_CARACT_TRIB", length = 40)
	public String getScaractTrib() {
		return this.scaractTrib;
	}

	public void setScaractTrib(String scaractTrib) {
		this.scaractTrib = scaractTrib;
	}

	@Column(name = "B_STATUS", nullable = false, precision = 1, scale = 0)
	public Boolean getBstatus() {
		return this.bstatus;
	}

	public void setBstatus(Boolean bstatus) {
		this.bstatus = bstatus;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Column(name = "N_FOLIO", length = 12)
	public String getNfolio() {
		return this.nfolio;
	}

	public void setNfolio(String nfolio) {
		this.nfolio = nfolio;
	}

}
